package com.csot.mybatis_plus.controller;

import com.csot.mybatis_plus.entity.Result;
import com.csot.mybatis_plus.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Sun.chuanwang
 * @version 1.0.0
 * @date 2021/1/17 22:14
 */
@RestController
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @RequestMapping("category/list")
    public Result queryAll(){
        return new Result(0,"查询成功",categoryService.queryAll());
    }
}
